View Javadoc

1   /*
2    * GridId.java
3    *
4    * Created on January 5, 2005, 5:32 PM
5    */
6   
7   package org.opensciencegrid.authz.common;
8   
9   /*** Represent a grid identity to be mapped by the GRID Identity Mapping Service.
10   * It includes the host on which the identity should be mapped, the user credentials,
11   * and the issuer of the VOMS extended attributes.
12   *
13   * @author Gabriele Carcassi, Markus Lorch
14   * augmented 2005-03-10, added toString method for logging
15   */
16  public class GridId {
17  
18      private String hostDN;
19      private String userDN;
20      private String userFQAN;
21      private String userFQANIssuer;
22  
23      /***
24       * Returns the host/service on which the GRID Identity was established.
25       * @return Value the DN of the host (i.e. "/DC=org/DC=doegrids/OU=Service/CN=myhost.mysite.com").
26       */
27      public String getHostDN()  {
28  
29          return this.hostDN;
30      }
31  
32      /***
33       * Changes the host/service on which the GRID Identity was established.
34       * @param host the DN of the host (i.e. "/DC=org/DC=doegrids/OU=Service/CN=myhost.mysite.com").
35       */
36      public void setHostDN(java.lang.String hostDN)  {
37  
38          this.hostDN = hostDN;
39      }
40  
41      /***
42       * The DN of the GRID identity (i.e. the user DN to be mapped).
43       * @return a certificate DN (i.e. "/DC=org/DC=doegrids/OU=People/CN=Gabriele Carcassi 12734").
44       */
45      public String getUserDN() {
46  
47          return this.userDN;
48      }
49  
50      /***
51       * Changes the DN of the GRID identity (i.e. the user DN to be mapped).
52       * @param userDN a certificate DN (i.e. "/DC=org/DC=doegrids/OU=People/CN=Gabriele Carcassi 12734").
53       */
54      public void setUserDN(String userDN) {
55  
56          this.userDN = userDN;
57      }
58  
59      /***
60       * The FQAN (VOMS attributes) of the GRID identity (i.e. the user DN to be mapped).
61       * @return a VOMS FQAN (i.e. "/vo/subgroup/Role=role").
62       */
63      public String getUserFQAN() {
64  
65          return this.userFQAN;
66      }
67  
68      /***
69       * Changes the FQAN (VOMS attributes) of the GRID identity (i.e. the user DN to be mapped).
70       * @param userFQAN a VOMS FQAN (i.e. "/vo/subgroup/Role=role").
71       */
72      public void setUserFQAN(String userFQAN) {
73  
74          this.userFQAN = userFQAN;
75      }
76  
77      /***
78       * The issuer of the VOMS extended proxy.
79       * @return TODO what does it look like?
80       */
81      public String getUserFQANIssuer() {
82  
83          return this.userFQANIssuer;
84      }
85  
86      /***
87       * Changes the issuer of the VOMS extended proxy.
88       * @param userFQANIssuer TODO what does it look like?
89       */
90      public void setUserFQANIssuer(String userFQANIssuer) {
91  
92          this.userFQANIssuer = userFQANIssuer;
93      }
94  
95  
96      /*** 
97       * logging method prints all contents to a string *
98       */
99      public String toString() {
100       return "- UserDN:"+getUserDN()
101            +" - HostDN"+getHostDN()
102            +" - FQAN:"+getUserFQAN()
103            +" - FQANIssuer:"+getUserFQANIssuer();
104 
105     } 
106     
107 }